contraste = 0.7;
saturacao = 2;

Im = imread('Teste1.jpg');

% Com filtro
cIm=imadjust(Im, [0 contraste], [0 1]);
Imhsv = rgb2hsv(cIm);
Imhsv(:,:,2) = Imhsv(:,:,2) * saturacao;
Imhsv(Imhsv > 1) = 1;
h = fspecial('average');
Imhsv(:,:,1) = imfilter(Imhsv(:,:,1), h);
Imhsv(:,:,2) = imfilter(Imhsv(:,:,2), h);
Imhsv(:,:,3) = imfilter(Imhsv(:,:,3), h);
Imsat = hsv2rgb(Imhsv);
Imseg = detectar_mao_k_means(Imsat);

imshow(Imseg);

% Sem filtro
cIm=imadjust(Im, [0 contraste], [0 1]);
Imhsv = rgb2hsv(cIm);
Imhsv(:,:,2) = Imhsv(:,:,2) * saturacao;
Imhsv(Imhsv > 1) = 1;
h = fspecial('average');
Imsat = hsv2rgb(Imhsv);
Imseg = detectar_mao_k_means(Imsat);

figure;
imshow(Imseg);